package com.bdqn.crm.controller;

import com.bdqn.crm.pojo.SysRole;
import com.bdqn.crm.service.SysRoleService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class SysRoleController {

    @Resource
    private SysRoleService sysRoleService;

    @RequestMapping(value = "/user/add")
    public String add(Model model){
        List<SysRole> roles = sysRoleService.findAllRoles();
        model.addAttribute("roles",roles);
        return "user/add";
    }

}
